package com.wwg.cms.bo.entity;
import com.wwg.cms.bo.*;
/**
 *create auto on 2010-8-31 16:43:18
 *create by wwl
 * message
 * 
 * @hibernate.class table="message" *  mutable="true" 
 *  proxy="com.wwg.cms.bo.entity.MessageEntity" 
 */
public class MessageEntity implements Message{

	 private Long id;
	 private Long toUserId;
	 private Long fromUserId;
	 private String content;
	 private Boolean isReaded;
	/**
	 *
 	 *
	 * @hibernate.id  column="id"
	 *  unsaved-value="null"
 	 *  generator-class="native"
	 * @return Long 
	 */
	public Long getId() {
		return id;
	}
	public void setId(Long id){
		this.id = id;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="to_user_id"
	 * @return Long 
	 */
	public Long getToUserId() {
		return toUserId;
	}
	public void setToUserId(Long toUserId){
		this.toUserId = toUserId;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="from_user_id"
	 * @return Long 
	 */
	public Long getFromUserId() {
		return fromUserId;
	}
	public void setFromUserId(Long fromUserId){
		this.fromUserId = fromUserId;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="content"
	 * @return String 
	 */
	public String getContent() {
		return content;
	}
	public void setContent(String content){
		this.content = content;
	}
	/**
	 *是否已读
 	 *
	 * @hibernate.property column="is_readed"
	 * @return Boolean 
	 */
	public Boolean getIsReaded() {
		return isReaded;
	}
	public void setIsReaded(Boolean isReaded){
		this.isReaded = isReaded;
	}
  @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MessageEntity that = (MessageEntity) o;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        return true;
    }

    @Override
    public int hashCode() {
        return id != null ? MessageEntity.class.hashCode()+id.hashCode() : MessageEntity.class.hashCode();
    }


}


